package com.taldh.design.patterns.strategy.impl;

/**
 * date 2020/6/3
 *
 * @author 袁小黑
 * @version 1.0.0
 **/

public class Sorter {

    private SortStrategy sortStrategy = new BubbleSortStrategy();

    public void setSortStrategy(SortStrategy sortStrategy) {
        this.sortStrategy = sortStrategy;
    }

    public <T> void sort(Comparable<T>[] arrays) {
        sortStrategy.sort(arrays);
    }

}
